package com.certificationManager.server.service;

import com.certificationManager.client.bean.UserBean;
import com.certificationManager.client.service.InitService;
import com.certificationManager.server.domain.dao.jdo.LanguageDAOJdo;
import com.certificationManager.server.domain.dao.jdo.UserDAOJdo;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * @author Benjamin Barbier
 *
 */
public class InitServiceImpl extends RemoteServiceServlet implements
InitService {

	/** Serial */
	private static final long serialVersionUID = 1L;

	@Override
	public void initDB() throws Exception {
		
		LanguageDAOJdo.getInstance().initLanguages();
		UserDAOJdo.getInstance().inscription(new UserBean("Bob","Dylan","Bob.Dylan@mail.com","pass","FR"));
		UserDAOJdo.getInstance().existUtilisateur("Bob.Dylan@mail.com");
		UserDAOJdo.getInstance().existUtilisateur("notExists@mail.com");
		
	}

}
